//----------------------------------------------
//				HardwareProfile.c
// 	Simple IMU
// 	Arthur Bemann 07/10/2011
//-----------------------------------------------
//
//	Description:
//	Definition of the hardware connections and settings
//  for this project.
//	
//-----------------------------------------------

//---------------------- IO -----------------------------

// Mode Led
#define LED			PORTAbits.RA1 			//single MODE led 
#define LED_DIR		TRISAbits.TRISA1
#define LED_ON()   	LED = 1
#define LED_OFF()  	LED = 0
#define LED_Toggle()	LED = !LED

//pseudofunctions for voltage regulator switch
#define VREGEN		PORTAbits.RA0 			//single vreg enable pin 
#define VREGEN_DIR	TRISAbits.TRISA0
#define VREG_ON()  	VREGEN_DIR=0; VREGEN=1
#define VREG_OFF() 	VREGEN_DIR=0; VREGEN=0

//-------------- Serial CONFIGURATION --------------------
#define	BRATE		115000					// 115kbps
//#define U2_INV							// sinais invertidos ( Idle LO)
#define U2RxPin _U2RXR = 5					// U2RX no pino RP5
#define U2TxPin	_RP4R = 5					// U2TX no pino RP4

//------------- Clock frequency values -------------------
//used for UART and SPI baud rate generation.
#define GetSystemClock()		(32000000ul)			// Hz
#define GetInstructionClock()	(GetSystemClock()/2)	// Normally GetSystemClock()/4 for PIC18, GetSystemClock()/2 for PIC24/dsPIC, and GetSystemClock()/1 for PIC32.  Might need changing if using Doze modes.
#define GetPeripheralClock()	(GetSystemClock()/2)	// Normally GetSystemClock()/4 for PIC18, GetSystemClock()/2 for PIC24/dsPIC, and GetSystemClock()/1 for PIC32.  Divisor may be different if using a PIC32 since it's configurable.


